<template>
    <div class='priceList'>
        <el-dialog
            title="价格记录"
            :visible.sync="dialogVisible"
            width="30%"
            class='record'
            :close-on-click-modal='false'
            :before-close="handleClose">
            <ul>
                <li v-for='(item,index) in priceChanges' :key='index'>
                    {{item.time | parseTime('{y}-{m}-{d} {h}:{i}')}}  设为  {{getMoney(item)}}元/份
                </li>
            </ul>
        </el-dialog>    
    </div>
</template>


<script>
import { parseTime } from '@/utils';
export default {
    name:'priceList',
    data(){
        return {
             dialogVisible:false,
             priceChanges:[]
        }
    },
    methods:{
        openPrice(priceChangesData){
            this.dialogVisible = true;
            this.priceChanges = priceChangesData.reverse();
        },
        getMoney(item){
            return item.after/100;
        },
        handleClose(done){
            done();
        },
    }
}
</script>


<style lang="less" scoped>
.priceList{
    .record{
        ul{
            line-height: 3rem;
            li:first-child{
                color: rgba(0, 0, 0, 1);
            }
            li{
                color: #c0c0c0;
                font-size: 18px;
            }
        }
    }
}
</style>
